package com.shenmazong.dto;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 公司职位中间表:闫瑞
 * @TableName tb_company_job
 */
@TableName(value ="tb_company_job")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TbCompanyJob implements Serializable {
    /**
     * 公司id
     */
    private Long companyId;

    /**
     * 职位id
     */
    private Long jobId;

    /**
     * 招收人数
     */
    private Integer jobNum;

    /**
         * 职位工资(单位:分)
     */
    private Long jobSalary;

    /**
     * 职位年薪发放月数(例如：一年12薪)
     */
    private Integer salaryNum;

    /**
     * 是否面议0否1是
     */
    private Integer companyNegotiable;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 修改时间
     */
    private Date updateTime;

    /**
     * 物理删除0未删除1删除
     */
    private Byte deleteFlag;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TbCompanyJob other = (TbCompanyJob) that;
        return (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
            && (this.getJobId() == null ? other.getJobId() == null : this.getJobId().equals(other.getJobId()))
            && (this.getJobNum() == null ? other.getJobNum() == null : this.getJobNum().equals(other.getJobNum()))
            && (this.getJobSalary() == null ? other.getJobSalary() == null : this.getJobSalary().equals(other.getJobSalary()))
            && (this.getSalaryNum() == null ? other.getSalaryNum() == null : this.getSalaryNum().equals(other.getSalaryNum()))
            && (this.getCompanyNegotiable() == null ? other.getCompanyNegotiable() == null : this.getCompanyNegotiable().equals(other.getCompanyNegotiable()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDeleteFlag() == null ? other.getDeleteFlag() == null : this.getDeleteFlag().equals(other.getDeleteFlag()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
        result = prime * result + ((getJobId() == null) ? 0 : getJobId().hashCode());
        result = prime * result + ((getJobNum() == null) ? 0 : getJobNum().hashCode());
        result = prime * result + ((getJobSalary() == null) ? 0 : getJobSalary().hashCode());
        result = prime * result + ((getSalaryNum() == null) ? 0 : getSalaryNum().hashCode());
        result = prime * result + ((getCompanyNegotiable() == null) ? 0 : getCompanyNegotiable().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDeleteFlag() == null) ? 0 : getDeleteFlag().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", companyId=").append(companyId);
        sb.append(", jobId=").append(jobId);
        sb.append(", jobNum=").append(jobNum);
        sb.append(", jobSalary=").append(jobSalary);
        sb.append(", salaryNum=").append(salaryNum);
        sb.append(", companyNegotiable=").append(companyNegotiable);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", deleteFlag=").append(deleteFlag);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}